// TODO: isCloudVersion
export const HTTP_REQUEST_PUBLIC_BASE_URL =
  process.env.ILLA_INSTANCE_ID === "CLOUD"
    ? `https://${process.env.ILLA_API_BASE_URL}`
    : // if use self-host,must has protocol,like this:http://localhost:8080
      process.env.ILLA_API_BASE_URL
      ? `${location.protocol}//${process.env.ILLA_API_BASE_URL}`
      : `${location.origin}`

export const BUILDER_REQUEST_PREFIX = "/builder/api/v1"
export const BUILDER_WS_REQUEST_PREFIX = "/builder-ws/api/v1"
export const CLOUD_REQUEST_PREFIX = "/supervisor/api/v1"
export const ACTION_REQUEST_PREFIX = "/action/api/v1"
export const DRIVE_REQUEST_PREFIX = "/drive/api/v1"
export const PUBLIC_DRIVE_REQUEST_PREFIX = "/drive/f"
export const AGENT_REQUEST_PREFIX = "/resource-manager/api/v1"
export const WORKFLOW_REQUEST_PREFIX = "/flow/api/v1"
export const DOMAIN_REQUEST_PREFIX = "/domain/api/v1"

export const MARKETPLACE_AUTH_REQUEST_PREFIX = "/marketplace/api/v1/auth"
export const MARKETPLACE_AUTH_PRODUCT_REQUEST_PREFIX =
  "/marketplace/api/v1/auth/products"
export const MARKETPLACE_PUBLIC_REQUEST_PREFIX =
  "/marketplace/api/v1/open/products"

export const MARKETPLACE_HASH_TAG_REQUEST_PREFIX =
  "/marketplace/api/v1/open/hashtags"
